**
** Efficient implementation for a stand-alone 1x1 Mat of Float.
**
internal class Float11Mat: Mat {

	private Float a

	override Obj? get(Obj coords) {
		// Calling index will check the bounds for us.
		index(coords)
		return a
	}

	override Float getf(Int r, Int c := 0) {
		// More efficient 2D bounds check. Still needs out to a different method.
		if (r < -1 || r > 0) {
			throw Err("bad r: $r")
		}
		if (c < -1 || c > 0) {
			throw Err("bad c: $c")
		}
		return a
	}

	override Type of() {
		Float#
	}

	new make(Float a) {
		this.a = a
	}

	override once Int[] shape() {
		[1, 1].toImmutable
	}

}
